//
//  YZLCarRedioPlayer.h
//  Car
//
//  Created by dllo on 15/11/5.
//  Copyright © 2015年 岳明. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>

@protocol YZLCarRedioPlayerDelegate <NSObject>

// 当前播放时间
- (void)AVPlayingWithProgress:(CGFloat)progress;

@end

@interface YZLCarRedioPlayer : NSObject

@property (nonatomic, strong) id<YZLCarRedioPlayerDelegate>delegate;
@property (nonatomic, strong) AVPlayer *player;
@property (nonatomic, strong) AVPlayerItem *playItem;
@property (nonatomic, copy) NSString *currentStr;
@property (nonatomic, assign) BOOL isplaying;
@property (nonatomic, strong) NSTimer *time;

//播放器单例
+ (YZLCarRedioPlayer *)shareInstance;

//音乐播放前的准备
- (void)prepareToPlayWithStr:(NSString *)fileStr;

//播放
- (void)play;

//暂停
- (void)pause;

@end
